<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>实例资料</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="/static/layui/css/layui.css" media="all">
</head>
<body style="padding: 0 10px;">

<blockquote class="layui-elem-quote layui-text" style="margin-top: 10px;">实例资料</blockquote>

<table class="layui-table" lay-skin="line">
    <colgroup>
        <col width="150">
        <col>
    </colgroup>
    <thead>
    <tr>
        <th>项目</th>
        <th>信息</th>
    </tr>
    </thead>
    <tbody>
    <tr>
        <td>ID</td>
        <td>{$example.id}</td>
    </tr>
    <tr>
        <td>名称</td>
        <td>{$example.name}</td>
    </tr>
    <tr>
        <td>样式名称</td>
        <td><a href="{$style.id}" class="layui-btn layui-btn-xs">{$style.name}</a></td>
    </tr>
    <tr>
        <td>接待客服</td>
        <td>
            {volist name="staffList" id="vo"}
            <a href="/index.php/staff/Staff_Manage/viewStaff/id/{$vo.id}" class="layui-btn layui-btn-xs">{$vo.name}</a>
            {/volist}
        </td>
    </tr>
    <tr>
        <td>邀请功能</td>
        <td>{eq name="example.invitation_switch" value="1"}启用{else/}禁用{/eq}</td>
    </tr>
    <tr>
        <td>首次邀请延迟</td>
        <td>{$example.invitation_first} 秒</td>
    </tr>
    <tr>
        <td>后续邀请延迟</td>
        <td>{$example.invitation_after} 秒</td>
    </tr>
    <tr>
        <td>邀请次数</td>
        <td>{eq name="example.invitation_num" value="0"}不限{else/}
            {$example.invitation_num} 次{/eq}</td>
    </tr>
    <tr>
        <td>邀请时间范围</td>
        <td>{$example.invitation_time}</td>
    </tr>
    <tr>
        <td>邀请星期范围</td>
        <td>
            {volist name="example.invitation_week" id="vo"}
            {eq name="vo" value="1"} <span class="layui-badge">周一</span> {/eq}
            {eq name="vo" value="2"} <span class="layui-badge">周二</span> {/eq}
            {eq name="vo" value="3"} <span class="layui-badge">周三</span> {/eq}
            {eq name="vo" value="4"} <span class="layui-badge">周四</span> {/eq}
            {eq name="vo" value="5"} <span class="layui-badge">周五</span> {/eq}
            {eq name="vo" value="6"} <span class="layui-badge">周六</span> {/eq}
            {eq name="vo" value="7"} <span class="layui-badge">周日</span> {/eq}
            {/volist}
        </td>
    </tr>
    <tr>
        <td>自动关闭邀请框</td>
        <td>{eq name="example.invitation_auto_close" value="0"}不关闭{else/}
            {$example.invitation_auto_close} 秒{/eq}</td>
    </tr>
    <tr>
        <td>创建时间</td>
        <td>{$example.create_time}</td>
    </tr>
    <tr>
        <td>修改时间</td>
        <td>{$example.update_time}</td>
    </tr>
    <tr>
        <td>描述</td>
        <td>
            <div style="word-wrap: break-word; word-break: normal; width: 500px;">{$example.description}</div>
        </td>
    </tr>
    <tr>
        <td>操作</td>
        <td>
            <a href="/index.php/staff/example/index" class="layui-btn layui-btn-sm">返回</a>
            <a href="/index.php/staff/Example/deployExample/id/{$example.id}" class="layui-btn layui-btn-sm">部署</a>
            <a href="/index.php/staff/Example/updateExample/id/{$example.id}" class="layui-btn layui-btn-normal layui-btn-sm">修改</a>
            <button id="update" class="layui-btn layui-btn-danger layui-btn-sm">删除</button>

        </td>
    </tr>
    </tbody>
</table>

<script src="/static/layui/layui.js" charset="utf-8"></script>
<script>
    layui.use('layer', function () {
        var layer = layui.layer;
        var $ = layui.$;

        $(function () {
            $('#update').click(function () {
                layer.confirm('确定删除“{$example.name}”吗？<br>确认后，该实例部署的所有网页将<strong style="color: #FF5722;">失去</strong>在线客服的所有功能，请<strong style="color: #FF5722;">谨慎</strong>操作！', function (index) {
                    layer.close(index);
                    $.get('/index.php/staff/Example/delExample/id/{$example.id}');
                    location.href = '/index.php/staff/example/index';
                });
            });
        });
    });
</script>
</body>
</html>